<head>
  <meta name='layout' content='main'/>
  <title><g:message code="login.title" default="Team Manager Login"/></title>
  <style type='text/css' media='screen'>
  #login {
    margin: 25px 15px;
    padding: 10px;
    text-align: center;
    height: 200px
  }

  #login .inner {
    width: 360px;
    margin: 0px auto;
    text-align: left;
    padding: 10px; /*border-top: 1px dashed #cccccc;*/
    border: 1px solid #cccccc; /*background-color: #ffffff;*/
    float: left
  }

  #login .inner .fheader {
    padding: 4px;
    margin: 3px 0px 3px 0;
    color: #2e3741;
    font-size: 14px;
    font-weight: bold;
  }

  #login .inner .cssform p {
    clear: left;
    margin: 0;
    padding: 5px 0 8px 0;
    padding-left: 105px; /*border-top: 1px solid gray; *//*margin-bottom: 10px;*/
  /*height: 1%;*/
  }

  #login .inner .cssform input[type='text'] {
    width: 120px;
  }

  #login .inner .cssform label {
    font-weight: bold;
    float: left;
    margin-left: -105px;
    width: 100px;
  }

  #login .inner .login_message {
    color: red;
  }

  #login .inner .text_ {
    width: 120px;
  }

  #login .inner .chk {
    height: 12px;
  }

  #websiteUpdates {
    float: right;
    width: 450px;
    margin: 0px 30px 20px;
    text-align: left;
    padding: 10px;
    border: 1px solid #cccccc;

  }

  .mobileLogin {
    margin: 20px 20px 0px;
    font-size: 14px; /*border: 1px solid #ccc;*/

  }

  .mobileLogin a {
    color: #006dba;
  }
  </style>
</head>

<body>
  <g:javascript library="prototype"/>
  <script type="text/javascript">
    function checkForm() {
      if ((!$('j_username').value) || (!$('j_password').value)) {
        alert('${message(code:'login.missing', 'default':'Username or Password is missing.')}');
        return;
      } else {
        $('loginForm').submit();
      }
    }
    document.observe("dom:loaded", function() {
      Event.observe($('submitButton'), 'click', checkForm);
    });

  </script>

  <div class="mobileLogin">
    <a href="${createLinkTo(dir: '/m/login/auth')}">
      <g:message code="button.mobile.login" default="Mobile phone login: http://team.goal98.com/m/login/auth"/>
    </a>
  </div>

  <div id='login'>
    <div class='inner'>
      <g:if test='${flash.message}'>
        <div class='login_message'>${flash.message}</div>
      </g:if>
      <div class='fheader'><h1><g:message code="login.headline" default="Please Login.."/></h1></div>
      <form action='${postUrl}' method='POST' id='loginForm' class='cssform'>
        <p>
          <label for='j_username'><g:message code="login.id" default="Login ID"/></label>
          <input type='text' class='text_' name='j_username' id='j_username' value='${request.remoteUser}'/>
        </p>
        <p>
          <label for='j_password'><g:message code="login.password" default="Password"/></label>
          <input type='password' class='text_' name='j_password' id='j_password'/>
        </p>
        <!--<p>
					<label for='remember_me'>Remember me</label>
					<input type='checkbox' class='chk' name='_spring_security_remember_me' id='remember_me'
					<g:if test='${hasCookie}'>checked='checked'</g:if> />
				</p>-->
        <p>
          <input type='button' id="submitButton" value="${message(code: 'login.submit', 'default': 'Login')}"/>
          <input type='reset' value="${message(code: 'login.reset', 'default': 'Reset')}"/>
          <g:link controller="register" action="index">
            <g:message code="login.register" default="Click to Register"/>
          </g:link>
        </p>

      </form>
    </div>
    <div id='websiteUpdates'>
      <h1><g:message code="login.update.log" default="Website Update History"/></h1>
      <table>
        <thead>
          <th><g:message code="login.update.date" default="Date"/></th>
          <th><g:message code="login.update.desc" default="Description"/></th>
        </thead>
        <tbody>
          <tr>
            <td>2009-11-08</td>
            <td>1.0RC4发布(增加邮件功能)</td>
          </tr>
          <tr>
            <td>2009-10-31</td>
            <td>1.0RC3发布(增加手机版)</td>
          </tr>
          <tr>
            <td>2009-10-30</td>
            <td>1.0RC2发布</td>
          </tr>
          <tr>
            <td>2009-10-26</td>
            <td>1.0RC1发布</td>
          </tr>
          <tr>
            <td>2009-09-25</td>
            <td>更新首页</td>
          </tr>
          <tr>
            <td>2009-09-24</td>
            <td>完善注册功能</td>
          </tr>
          <tr>
            <td>2009-09-21</td>
            <td>更新登录界面</td>
          </tr>
          <tr>
            <td>2009-09-14</td>
            <td>网站创建</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
  <script type='text/javascript'>
    <!--
    (function() {
      document.forms['loginForm'].elements['j_username'].focus();
    })();
    // -->
  </script>

</body>
